# -*- coding: UTF-8 -*-

def test01():
    ...
    name = '''asdasd
    adsd
    asdasd'''
    print(name, end='')


def run(n):
    ...
    pks = ['1111', '222']
    if n == 1:
        yield 2
    else:
        yield 1

def test01():
    ...
    pks = ['1111', '222']
    g = run(1)
    print(g)
    print(next(g))
    # for pk in iter(g):
    #     print(pk)

def binaryToDecimal(str):

    if not str:
        return 0
    zero_ord = ord('0')
    res = 0
    while str:
        ...
        res = (res << 1) + ord(str[0]) - zero_ord
        str = str[1:]
    return res


if __name__ == '__main__':
    ...
    print(binaryToDecimal('1000'))
